package com.fastloan.jn.mgt.application.basic.enums;


import com.fastloan.jn.utils.SelectEnum;

/**
 * 进件状态枚举类
 *
 * @author chenkai
 */
public enum ApplicationStatus implements SelectEnum{
    /**
     * 创建中
     */
    CREATE_ING("创建中", 0),
    /**
     * 模型评估中
     */
    MODEL_AUDITING("模型评估中", 1),
    /**
     * 黑名单过滤中
     */
    BLACKLIST_FILTER_ING("黑名单过滤中", 2),
    /**
     * 审核中
     */
    UNDER_REVIEW("审核中", 4),
    /**
     * 待签约
     */
    TO_SIGNED("待签约", 5),
    /**
     * 审核未通过
     */
    APP_REJECT("审核未通过", 6),
    /**
     * 已签约
     */
    IS_SIGNED("已签约", 7),
    /**
     * 待放款
     */
    TO_LENT("待放款", 8),
    /**
     * 已放款
     */
    APP_LENDING("已放款", 9),
    /**
     * 退回客户经理
     */
    RETURN_MANAGER("退回客户经理", 10),
    /**
     * 已还款
     */
    IS_REPAYMENT("已还款", 11),
    /**
     * 已逾期
     */
    OVERDUE("已逾期", 12),
    /**
     * 黑名单拒绝
     */
    BLACKLIST_REFUSE("黑名单拒绝", 13),
    /**
     * 模型拒绝
     */
    MODEL_REFUSE("模型拒绝", 14) {
    };


    private int getType;
    private String getTypeName;

    public String getTypeName() {
        return getTypeName;
    }

    public Integer getType() {
        return getType;
    }

    public String getValueStr(){
        return getType + "";
    }

    ApplicationStatus(String getTypeName, int getType) {
        this.getTypeName = getTypeName;
        this.getType = getType;
    }


    public static ApplicationStatus getStatusById(Integer id) {
        switch (id) {
            case 0:
                return CREATE_ING;
            case 1:
                return MODEL_AUDITING;
            case 2:
                return BLACKLIST_FILTER_ING;
         /*   case 3:
                return PENDING;*/
            case 4:
                return UNDER_REVIEW;
            case 5:
                return TO_SIGNED;
            case 6:
                return APP_REJECT;
            case 7:
                return IS_SIGNED;
            case 8:
                return TO_LENT;
            case 9:
                return APP_LENDING;
            case 10:
                return RETURN_MANAGER;
            case 11:
                return IS_REPAYMENT;
            case 12:
                return OVERDUE;
            case 13:
                return BLACKLIST_REFUSE;
            case 14:
                return MODEL_REFUSE;
            default:
                break;
        }
        throw new IllegalArgumentException("进件状态不存在" + id);
    }
}
